#!/bin/sh
#
# @name Plane SITL
#

. ${R}etc/init.d/rc.fw_defaults

if [ $AUTOCNF = yes ]
then
	param set EKF2_ARSP_THR 8
	param set EKF2_FUSE_BETA 1
	param set EKF2_MAG_ACCLIM 0
	param set EKF2_MAG_YAWLIM 0

	param set FW_LND_AIRSPD_SC 1
	param set FW_LND_ANG 8
	param set FW_THR_LND_MAX 0

	param set FW_L1_PERIOD 12

	param set FW_MAN_P_MAX 30

	param set FW_PR_I 0.4
	param set FW_PR_P 0.9
	param set FW_PR_FF 0.2
	param set FW_PSP_OFF 2
	param set FW_P_LIM_MAX 32
	param set FW_P_LIM_MIN -15

	param set FW_RR_FF 0.1
	param set FW_RR_P 0.3

	param set FW_THR_MAX 0.6
	param set FW_THR_MIN 0.05
	param set FW_THR_CRUISE 0.25

	param set FW_T_ALT_TC 2
	param set FW_T_CLMB_MAX 8
	param set FW_T_HRATE_FF 0.5
	param set FW_T_SINK_MAX 2.7
	param set FW_T_SINK_MIN 2.2
	param set FW_T_TAS_TC 2

	param set FW_W_EN 1

	param set MIS_LTRMIN_ALT 30
	param set MIS_TAKEOFF_ALT 30

	param set NAV_ACC_RAD 15
	param set NAV_DLL_ACT 2
	param set NAV_LOITER_RAD 50

	param set RWTO_TKOFF 1

fi

set MIXER_FILE etc/mixers-sitl/plane_sitl.main.mix
set MIXER custom
